package com.zkthink.ceres.order.config;

import com.zkthink.ceres.order.properties.Kd100Properties;
import com.zkthink.ceres.order.properties.KdNiaoProperties;
import com.zkthink.ceres.order.util.Kd100TrackQueryAPI;
import com.zkthink.ceres.order.util.KdniaoTrackQueryAPI;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author JustArgo
 */
@Configuration
@EnableConfigurationProperties({Kd100Properties.class})
public class Kd100Configuration {

    @Bean
    public Kd100TrackQueryAPI initKd100Api(Kd100Properties prop){
        Kd100TrackQueryAPI api = new Kd100TrackQueryAPI();
        api.setKey(prop.getKey());
        api.setCustomer(prop.getCustomer());
        api.setSecret(prop.getSecret());
        api.setUserId(prop.getUserId());
        return api;
    }

}
